import request from '@/config/axios'

export interface MatchmakerInfoVO {
  id: number
  userId: number
  no: string
  name: string
  phone: string
  merchantIntro: string
  merchantCover: string
  status: number
}

// 查询相亲红娘信息列表
export const getMatchmakerInfoPage = async (params) => {
  return await request.get({ url: `/maker/matchmaker-info/page`, params })
}

// 查询相亲红娘信息详情
export const getMatchmakerInfo = async (id: number) => {
  return await request.get({ url: `/maker/matchmaker-info/get?id=` + id })
}

// 新增相亲红娘信息
export const createMatchmakerInfo = async (data: MatchmakerInfoVO) => {
  return await request.post({ url: `/maker/matchmaker-info/create`, data })
}

// 修改相亲红娘信息
export const updateMatchmakerInfo = async (data: MatchmakerInfoVO) => {
  return await request.put({ url: `/maker/matchmaker-info/update`, data })
}

// 删除相亲红娘信息
export const deleteMatchmakerInfo = async (id: number) => {
  return await request.delete({ url: `/maker/matchmaker-info/delete?id=` + id })
}

// 导出相亲红娘信息 Excel
export const exportMatchmakerInfo = async (params) => {
  return await request.download({ url: `/maker/matchmaker-info/export-excel`, params })
}
